package mode.buildMode03;

public class DirectorDemo {

    Builder mBuilder = null;

    public DirectorDemo(Builder builder) {
        mBuilder = builder;
    }


    public void construct(String board, String display) {
        mBuilder.buildBoard(board);
        mBuilder.buildDisplay(display);
        mBuilder.buildOS();
    }


    public static void main(String[] args) {
        Builder builder = new MacBuilder();

        //1， 相当于将 builder注入到 director中，
        DirectorDemo pcDirector = new DirectorDemo(builder);

        //2，对注入的builder进行赋值设置
        pcDirector.construct("intel", "retina display");

        //
        builder.create();
    }


}
